Skip to content

Fix run-developer.sh script#2

Closed
ermshiperete wants to merge 1 commit into
sillsdev:masterfrom
ermshiperete:master
Closed

Fix run-developer.sh script#2
ermshiperete wants to merge 1 commit into
sillsdev:masterfrom
ermshiperete:master

Conversation

@ermshiperete

@ermshiperete ermshiperete commented May 14, 2018

Copy link
Copy Markdown
Member
  • deploy-local.sh installs in /opt/machine-web-api
  • fix error if script parameters are omitted

This change is Reviewable

- deploy-local.sh installs in /opt/machine-web-api
- fix error if script parameters are omitted
@ddaspit

ddaspit commented May 15, 2018

Copy link
Copy Markdown
Contributor

I fixed these issues in another commit.

@ddaspit ddaspit closed this May 15, 2018
Enkidu93 added a commit that referenced this pull request Sep 26, 2023
Add strict parsing

Fixes sillsdev/serval#2
johnml1135 added a commit that referenced this pull request Jul 12, 2026
…), not nondet traversal

Task O2 (rust-optimizations-phase2.md): measurement-only, no engine fix. Profiled the two
known-slow Amharic words post-P10 (which doesn't touch Amharic's >64-def id-lane) with a real
profiler search first: WPR needs elevated privileges unavailable here; samply installs but only
records on Linux/macOS. Fell back to targeted Instant::now() phase instrumentation in the
HC_STEP_STATS style.

Added three permanent, opt-in (HC_FST_PROFILE=1), near-zero-cost diagnostics:
- hc_fst::profile (traverse.rs): Transduce::run/nondet-branch/distinct() call counts, total/max
  time, and traversed-set / raw-result-list sizes.
- hc_rules::morph::dedup_profile (morph.rs): push_remove_duplicates (the "keep-longer" dedup,
  lead #2) call counts, time, and out-list length.
- hc-cli prints both as FSTPROF/DEDUPPROF stderr lines alongside the existing STEPS line.

Findings (docs/o2-profile-findings.md): ~90-96% of wall-clock is inside Transduce::run for both
words, but the dominant sub-cost is NOT the nondeterministic traversal (14-30%) -- it's the
trailing distinct() dedup (59-81%), a Vec-scan + pairwise FstResult::result_eq comparison
processing up to ~500K raw results in a single call (C#'s Enumerable.Distinct is hash-backed
O(n); Register already derives Hash+Eq). Lead #2 (push_remove_duplicates) is refuted for these
words: <0.1% of wall-clock, out-list length never exceeded 1. Lead #3 (template-battery interior
memo) is inconclusive by direct measurement (no time went through that layer for either word) but
a code-reading check found hc-memo's template_memo already at parity with C#'s TemplateMemo
granularity. Live C# oracle run on ሌባዬ: 64.0s vs Rust's ~145s (~2.2-2.3x), byte-identical
signature -- confirms O2's "~2x per-step" framing freshly on this exact word.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
johnml1135 added a commit that referenced this pull request Jul 12, 2026
…hash-backed Distinct) dominates the FST-traversal cost gap, not the nondeterministic traversal itself

Verified independently: build clean; clippy had 19 new missing_const_for_thread_local
warnings from the new profiling instrumentation, fixed mechanically via cargo clippy --fix
before merge (now 0 warnings, matching repo baseline); full suite green.

Findings (rust/docs/o2-profile-findings.md): on both known-pathological Amharic words, 89-96%
of wall-clock is inside Transduce::run, but within that the dominant cost is the trailing
distinct() post-processing dedup (59-81% of total wall-clock) -- an O(n x kept) Vec-scan +
pairwise result_eq over raw match lists reaching 327K-501K elements -- not the nondeterministic
traversal loop (14-30%). Register already derives Hash+Eq and looks hashable in practice, so a
hash-based dedup matching C#'s Enumerable.Distinct looks directly applicable. Lead #2
(push_remove_duplicates keep-longer dedup) refuted as negligible. Lead #3 (template-battery
memo) inconclusive by measurement but code-reading confirms parity with C#. Flagged for a
Fable interpretation/fix follow-up, not implemented here (profiling-only per task scope).
johnml1135 added a commit that referenced this pull request Jul 12, 2026
Confirmed lead #1 (Transduce::run), re-localized to distinct()'s O(n x kept) dedup rather
than the nondeterministic traversal itself; refuted lead #2; deprioritized lead #3. Next step
is a Fable-tier hash-based distinct() redesign, not yet started.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants